#ifndef __fx0_h__
#define __fx0_h__


#define C_CALL		__stdcall
#define C_DLL_EXP	__declspec(dllexport)


#ifdef  __cplusplus  
extern "C" {  
#endif 


typedef struct _type_complex{
	double re;
	double im;	
}Complex;

typedef struct
{
    int array_length;
    double *array;
}marshalStruct;

typedef enum { 
	red=101, 
	green, 
	blue,
	black 
}colour;

typedef double* NAG_D01_FUN_PARA_T;
typedef void (C_CALL * NAG_D01_FUN)(NAG_D01_FUN_PARA_T output);

typedef struct {
    int flag; 
}Nag_Comm;
typedef void (C_CALL * NAG_E04UCC_FUN)(int, double *, Nag_Comm *);


C_DLL_EXP int   C_CALL int_add(int para1, int para2);
C_DLL_EXP char* C_CALL f_name_parse(char* string, int l_string);
C_DLL_EXP void  C_CALL f_name_free(char* real);
C_DLL_EXP void  C_CALL Scalars(double in, double *out);
C_DLL_EXP void  C_CALL OneDArray(int n, double anArray[]);
C_DLL_EXP void  C_CALL TwoDArray(int m, int n, double a2dArray[], int tda);
C_DLL_EXP void  C_CALL TryComplex(Complex inputVar, Complex *outputVar,\
								                  int n, Complex array[]);
C_DLL_EXP void  C_CALL MarshalStructC(marshalStruct *pointerinStruct);
C_DLL_EXP void  C_CALL FreeMarshalStructptr(marshalStruct *pointerinStruct);
C_DLL_EXP void C_CALL EnumString(colour rainbow, char *rainbowcolour);
C_DLL_EXP void C_CALL CallBack(NAG_D01_FUN f, NAG_D01_FUN_PARA_T output);
C_DLL_EXP void C_CALL CallbackWithStruct(NAG_E04UCC_FUN funct , 
                                        int n, double *a, Nag_Comm *user_comm);


#ifdef  __cplusplus  
}  
#endif  /* end of __cplusplus */ 

#endif
